import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export const constantRoutes = [
  {
    name:'default',
    path:'/',
    redirect:{name: 'dingTalkMessage'}
  },
  {
    name:'dingTalkMessage',
    path: '/dingTalkMessage',
    component: () => import('@/views/dingTalkMessage/index'),
    hidden: true,
    meta:{
        title:'钉钉消息群配置管理'
    }
  },
  {
    name:'messageSourceConfig',
    path: '/messageSourceConfig',
    component: () => import('@/views/messageSourceConfig/index'),
    hidden: true,
    meta:{
        title:'消息来源配置'
    }
  },
  {
    name:'configurationItem',
    path: '/configurationItem',
    component: () => import('@/views/configurationItem/index'),
    hidden: true,
    meta:{
        title:'配置下拉维护'
    }
  },
  {
    name:'configurationDetail',
    path: '/configurationDetail',
    component: () => import('@/views/configurationItem/mainPage/detailPage'),
    hidden: true,
    meta:{
        title:'配置下拉维护'
    }
  },
  {
    name:'openApiInterface',
    path: '/openApiInterface',
    component: () => import('@/views/openApi/index'),
    hidden: true,
    meta:{
        title:'openApi接口定义页面'
    }
  },
  {
    name:'openApiUserDefined',
    path: '/openApiUserDefined',
    component: () => import('@/views/openApiUser/index'),
    hidden: true,
    meta:{
        title:'openApi用户定义页面'
    }
  },
  {
    name:'releaseManagement',
    path: '/releaseManagement',
    component: () => import('@/views/releaseManagement/index'),
    hidden: true,
    meta:{
        title:'发布管理页面'
    }
  },
  {
    name:'importConfiguration',
    path: '/importConfiguration',
    component: () => import('@/views/importConfiguration/index'),
    hidden: true,
    meta:{
        title:'导入配置页面'
    }
  },
  {
    name:'batchLogHandle',
    path: '/batchLogHandle',
    component: () => import('@/views/batchLogHandle/index'),
    hidden: true,
    meta:{
        title:'批量日志页面'
    }
  },
//   {
//     name:'sampleDetail',
//     path: '/sampleDetail',
//     component: () => import('@/views/sampleConfirmation/mainPage/sampleDetail'),
//     hidden: true,
//     meta:{
//         title:'样品详情'
//     },
//   },
]

const createRouter = () => new Router({
//   base:'v01',发布到v1环境需要这个
  mode: 'history', // require service support
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})

const router = createRouter()


export default router
